In industrial robots installed for the product assembly process in manufacturing lines and for cutting and tooling of materials, teaching of a route and an operation sequence of a work head must be performed according to the shape of a three-dimensional workpiece prior to operation in practice. The operation for teaching three-dimensional operation of the work head is so-called "teaching". Teaching has been performed by manual operations in conventional industrial robots. For example, if an operator performs teaching for a CO.sub.2 laser cutting robot, he must operate a teaching pendant to cause a work head to come close to each teaching point constituting a scribed line marked on the surface of a workpiece as an object. Therefore, the work head is set in a predetermined three-dimensional position with respect to the teaching point, and three-dimensional position data is stored to complete teaching.
In recent years, for example, a magnetic sensor arranged near a work head is used to improve teaching efficiency. A magnitude of an eddy current generated on the workpiece is detected by the magnetic sensor, and a distance between the work head and the surface of the workpiece is measured. A distance between the work head and the workpiece is set on the basis of the measured distance
In conventional teaching operation, the operator must visually check the three-dimensional position of the work head with respect to the teaching point. For this reason, teaching results in cumbersome and time-consuming operations. In addition, skills are undesirably required to perform accurate position setting.
In a conventional position setting system having a conventional sensor such as a magnetic sensor, the distance between the head and the workpiece can be easily set. However, since the magnetic sensor has a large sensing area, measurement precision for a distance between the workpiece and a small area of the head is poor. The posture of the work head for the workpiece must be adjusted relying on visual setting by the operator. In this manner, high teaching efficiency and great improvement in measurement precision cannot be expected.
The present invention has been made in consideration of the above situation, and has as its object to provide a three-dimensional position sensor capable of accurately detecting a position and inclination angles of a sensor body with respect to a workpiece in a noncontact manner. It is another object of the present invention to provide a three-dimensional position setting system using the above three-dimensional sensor to accurately perform teaching for a robot or the like within a short period of time without requiring skills.